package org.fpp.proxy;

/**
 * @author bigbird-0101
 * @date 2024-06-20 22:31
 */
public class StaticProxy {

    public static void main(String[] args) {
        You you=new You();
        you.maiPiao();
    }

    /**
     * 你自己
     */
    public static class You{
        public void maiPiao(){
            //找到黄牛
            HuangNiu huangNiu=new HuangNiu();
            //向黄牛买票
            huangNiu.maiPiao();
        }
    }


    public static class HuangNiu{
        private ZhouJieLunGangFang zhouJieLunGangFang;
        public HuangNiu(){
            this.zhouJieLunGangFang = new ZhouJieLunGangFang();
        }
        public void maiPiao(){
            zhouJieLunGangFang.maiPiao();
        }
    }

    public static class ZhouJieLunGangFang {
        public void maiPiao(){
            System.out.println("卖一张周杰伦演唱会门票");
        }
    }
}
